/**
 * Created by mhy on 2018/6/30.
 */

import Vue from 'vue'
import Vuex from 'vuex'
import mutations from '../../../outsource/project/src/store/mutations'
import actions from '../../../outsource/project/src/store/actions'
import login from './modules/login'
import material from './modules/material'
import factory from './modules/factory'
import user from './modules/user'
import plate from './modules/plate'
import shop from './modules/shop'
Vue.use(Vuex)

const store = new Vuex.Store({
  state: {
    locationHeader: 'http://test.51artx.com/dist/#/',
    navTitle: '',
    showLogout: false,
    userInfo: sessionStorage.getItem('userInfo'),
    logined: sessionStorage.getItem('userlogined'),
    token: '',
    reqError: null,
    reqShake: 0,
    reqTokenFailed: 0,
    reqTokenExpire: 0,
  },
  getters: {

  },
  mutations: mutations,
  actions: actions,
  modules: {
    login,
    material,
    factory,
    user,
    plate,
    shop
  }
})

export default store


